const express = require('express')
const router = express.Router()
const service = require('./service')//相关操作逻辑


//用户相关接口
//上传文件（未测试）
router.post('/admin/upLoadImg', service.upLoadImg)
//管理员登录
router.post('/admin/login', service.login)
//获取管理员用户信息
router.get('/admin/getAdminInfo', service.getAdminInfo)
//分页模糊查询显示用户的信息
router.get('/admin/getCurrentPageUser', service.getCurrentPageUser)
//更新用户信息
router.post('/admin/updateUserInfo', service.updateUserInfo)
//删除用户信息
router.post('/admin/deleteUserInfo', service.deleteUserInfo)
//注册添加用户
router.post('/admin/addUserInfo', service.addUserInfo)



//电影相关接口(需要的补充)



//影院相关接口

//获取当前页影院
router.get('/admin/getCurrentPageCinema', service.getCurrentPageCinema)
//更新影院信息
router.post('/admin/updateCinemaInfo', service.updateCinemaInfo)
//删除影院信息
router.post('/admin/deleteCinemaInfo', service.deleteCinemaInfo)
//添加影院信息
router.post('/admin/addCinemaInfo', service.addCinemaInfo)

//评论相关接口

//获取当前页评论
router.get('/admin/getCurrentPageComment', service.getCurrentPageComment)
//通过当前评论
router.post('/admin/passCurrentComment', service.passCurrentComment)
//删除当前评论
router.post('/admin/deleteCurrentComment', service.deleteCurrentComment)

//订单相关接口

//获取当前页订单
router.get('/admin/getCurrentPageOrder', service.getCurrentPageOrder)
//删除订单
router.post('/admin/deleteOrder', service.deleteOrder)

//影厅部分接口

//获取当前页影厅
router.get('/admin/getCurrentPageHall', service.getCurrentPageHall)
//删除影厅
router.post('/admin/deleteHall', service.deleteHall)
//更新影厅信息
router.post('/admin/updateHallInfo', service.updateHallInfo)
//获取所有影院
router.get('/admin/getAllCinema', service.getAllCinema)
//添加影厅信息
router.post('/admin/addHallInfo', service.addHallInfo)
//获取当前页电影
router.get('/admin/getCurrentPageMovieSchedule', service.getCurrentPageMovieSchedule)
//获取所有电影
router.get('/admin/getAllMovie', service.getAllMovie)
//获取影院的影厅
router.get('/admin/getHallByCinemaId', service.getHallByCinemaId)
//获取排片的某天的时间段安排
router.get('/admin/getHasScheduleDateTime', service.getHasScheduleDateTime)
//添加影院信息
router.post('/admin/addScheduleInfo', service.addScheduleInfo)
//删除影厅电影
router.post('/admin/deleteMovieSchedule', service.deleteMovieSchedule)



// 将路由对象共享出去
module.exports = router